﻿using System;
using System.Collections.Generic;
using AudioPlayer.Plugin.Storage;
namespace AudioPlayer.Storage {
	public class Song : ISong {
		#region Variables
		private Guid _guid;
		private string _filename;
		private string _artist;
		private string _title;
		private string _album;
		private string _genre;
		private string _comment;
		private int _year;
		private int _rating;
		private int _length;
		private int _track;
		private int _disc;
		private int _playAuto;//Kiek kartu paleista automatiskai groti
		private int _playUser;//Kiek kartu useris paleido;
		private int _playSkip;//Kiek kartu praskipino
		private bool _empty;

		private IList<IPicture> _pictures;
		#endregion
		#region Public Voids

		#endregion
		#region Override 
		public override string ToString() {
			//return base.ToString();
			if (_title != null && _artist != null) {
				return (_artist + " - " + _title);
			} else {
				return _filename;
			}
		}
		#endregion
		#region Property
		public Guid Guid {
			get { return _guid; }
			set { _guid = value; }
		}
		public string Filename {
			get { return _filename; }
			set { _filename = value; }
		}
		public string Artist {
			get { return _artist; }
			set { _artist = value; }
		}
		public string Title {
			get { return _title; }
			set { _title = value; }
		}
		public string Album {
			get { return _album; }
			set { _album = value; }
		}
		public string Genre {
			get { return _genre; }
			set { _genre = value; }
		}
		public string Comment {
			get { return _comment; }
			set { _comment = value; }
		}

		public int Track {
			get { return _track; }
			set { _track = value; }
		}
		public int Disc {
			get { return _disc; }
			set { _disc = value; }
		}
		public int Year {
			get { return _year; }
			set { _year = value; }
		}

		public int Rating {
			get { return _rating; }
			set { _rating = value; }
		}
		public int Length {
			get { return _length; }
			set { _length = value; }
		}
		public int PlayAuto {
			get { return _playAuto; }
			set { _playAuto = value; }
		}
		public int PlayUser {
			get { return _playUser; }
			set { _playUser = value; }
		}
		public int PlaySkip {
			get { return _playSkip; }
			set { _playSkip = value; }
		}
		public int PlayTotal {
			get {
				return (_playAuto + _playUser);
			}
		}
		public int Hash {
			get { return _filename.GetHashCode(); }
		}
		public bool Empty {
			get { return _empty; }
			set { _empty = value; }
		}
		public bool Valid {
			get { return true; }
		}

		public IList<IPicture> Pictures {
			get { return _pictures; }
			set { _pictures = value; }
		}
		#endregion
	}
}
